package com.fortune.dto.acl;

import com.fortune.entity.MAclModule;
import com.google.common.collect.Lists;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Getter
@Setter
@ToString
public class MAclModuleLevelDto extends MAclModule {

    private List<MAclModuleLevelDto> aclModuleList = Lists.newArrayList();

    private List<MAclDto> aclList = Lists.newArrayList();

    public static MAclModuleLevelDto adapt(MAclModule aclModule) {
        MAclModuleLevelDto dto = new MAclModuleLevelDto();
        BeanUtils.copyProperties(aclModule, dto);
        return dto;
    }
}
